package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ChannelAttr entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "channel_attr", catalog = "vcms_0.1")
public class ChannelAttr implements java.io.Serializable {

	// Fields

	private Integer channelAttrId;
	private Channel channel;
	private String attrName;
	private String attrValue;

	// Constructors

	/** default constructor */
	public ChannelAttr() {
	}

	/** full constructor */
	public ChannelAttr(Channel channel, String attrName, String attrValue) {
		this.channel = channel;
		this.attrName = attrName;
		this.attrValue = attrValue;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "channelAttrId", unique = true, nullable = false)
	public Integer getChannelAttrId() {
		return this.channelAttrId;
	}

	public void setChannelAttrId(Integer channelAttrId) {
		this.channelAttrId = channelAttrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "channelId")
	public Channel getChannel() {
		return this.channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

	@Column(name = "attrName", length = 100)
	public String getAttrName() {
		return this.attrName;
	}

	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	@Column(name = "attrValue", length = 100)
	public String getAttrValue() {
		return this.attrValue;
	}

	public void setAttrValue(String attrValue) {
		this.attrValue = attrValue;
	}

}